<template>
  <div class="dashboard-container">
    <div class="dashboard-editor-container">
      <panel-group/>
      <panel-group-t/>
    </div>
    <div class="dashboard-editor-container">
      <h3>待办事项</h3>
      <matter/>
    </div>
  </div>
</template>

<script>
import {mapGetters} from 'vuex'
import PanelGroup from './PanelGroup'
import PanelGroupT from './PanelGroupT'
import matter from './matter'

export default {
  name: 'Dashboard',
  components: {
    PanelGroup,
    PanelGroupT,
    matter
  },
  data() {
    return {
      currentRole: 'adminDashboard'
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  },
  async created() {
    if (!this.roles.includes('admin')) {
      this.currentRole = 'editorDashboard'
    }
  }
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.dashboard-editor-container {
  margin-right: 40px;
  margin-left: 30px;
}
</style>
